import request from '/@/utils/request';

/**
 * 
 * @method 
 * 
 */
export function requirementContentApi() {
	return {
		getList: (params?: object) => {
			return request({
				url: '/api/requirementContent/list',
				method: 'GET',
				params
			}).then(res =>{
				if (res.data.code === "000000") {
					return Promise.resolve(res.data);
				} else {
					return Promise.reject(res.data);
				}
			});
		},
		save: (params: object) => {
			return request({
				url: '/api/requirementContent/save',
				method: 'POST',
				data:params
			})
		},
		delete: (params: object) => {
			return request({
				url: '/api/requirementContent/delete',
				method: 'GET',
				params
			})
		},
		getRequirementList: (params?: object) => {
			return request({
				url: '/api/requirementContent/getRequirementList',
				method: 'GET',
				params
			}).then(res =>{
				if (res.data.code === "000000") {
					return Promise.resolve(res.data);
				} else {
					return Promise.reject(res.data);
				}
			});
		},
		changeStatus: (params?: object) => {
			return request({
				url: '/api/requirementContent/changeStatus',
				method: 'GET',
				params
			})
		},
	};
}
